import React from 'react';

interface ToastNotificationProps {
  show: boolean;
  message: string;
  type: 'success' | 'error';
  className?: string;
}

const ToastNotification: React.FC<ToastNotificationProps> = ({ 
  show, 
  message, 
  type, 
  className = '' 
}) => {
  if (!show) return null;

  return (
    <div className={`fixed top-20 left-0 right-0 flex justify-center items-center z-[9999] pointer-events-none ${className}`}>
      <div
        className={`px-5 py-4 rounded-lg shadow-xl text-white 
          ${type === 'success' ? 'bg-green-600' : 'bg-red-600'} 
          bg-opacity-95 max-w-[90%] animate-fade-in font-medium`}
      >
        <div className="flex items-center">
          <i className={`mr-3 text-xl ${type === 'success' ? 'fas fa-check-circle' : 'fas fa-exclamation-circle'}`}></i>
          <span className="text-base">{message}</span>
        </div>
      </div>
    </div>
  );
};

export default ToastNotification; 